﻿namespace Basmus.Values
{
    public class ValuesContext
    {
        public ValuesContext(ModelContext modelContext, string name)
        {
            ModelContext = modelContext;
            Name = name;
        }
        public ModelContext ModelContext { get; private set; }

        public string Name { get; private set; }

        public bool Equals(ValuesContext other)
        {
            var result = ModelContext == other.ModelContext && Name == other.Name;
            return result;
        }

        public override int GetHashCode()
        {
            return ModelContext.GetHashCode() ^ Name.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            return Equals((ValuesContext)obj);
        }

        public static bool operator ==(ValuesContext a, ValuesContext b)
        {
            return a.Equals(b);
        }

        public static bool operator !=(ValuesContext a, ValuesContext b)
        {
            return !(a == b);
        }
    }

    
}